#
# Be sure to run `pod lib lint HLDemo.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
  s.name             = 'HLDemo'
  s.version          = '0.0.40'
  s.summary          = 'A short description of HLDemo.'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!

  s.description      = <<-DESC
TODO: Add long description of the pod here.
                       DESC

  s.homepage         = 'https://gitee.com/Holink521/HLDemo'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'hulinhu' => 'hulinhu2010@163.com' }

  s.ios.deployment_target = '9.0'
  s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }

  # zip 路径 或 http
  iOS_lib_ZipURL = "http://localhost:8080/SDK_Downloads/#{s.name}-#{s.version.to_s}.zip"

  if ENV['use_source'] || ENV["#{s.name}_use_source"]
    puts "--------- #{s.name} is in source code state now. -------"
    s.prepare_command = <<-CMD
        test -f download_zip.sh && sh download_zip.sh #{s.name} #{s.version} #{iOS_lib_ZipURL}
    CMD
    s.source = { :git => 'https://gitee.com/Holink521/HLDemo.git', :tag => s.version.to_s }
    s.source_files = 'HLDemo/Classes/**/*'   
  else
    s.source = { :http => iOS_lib_ZipURL }
    s.vendored_frameworks = 'HLDemo.framework'
  end
 s.preserve_paths = "#{s.name}.framework", "#{s.name}/**/*", "download_zip.sh"


  # s.resource_bundles = {
  #   'HLDemo' => ['HLDemo/Assets/*.png']
  # }

  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'
end
